package HookDemo;
public class TestShutdownHook2 extends Thread {

	public static void main(String[] args) {
		TestShutdownHook3 t = new TestShutdownHook3();
		TaskThread taskThread = new TaskThread();
		t.addShutdownHook(taskThread);
		taskThread.start();
		System.out.println("第二");
		TaskThread t2 = new TaskThread();
		t2.start();
	}
}
